
\newcommand{\printInstallItems}[1]{%
	\printOutline{3}{3}{
		\printItems{{%
				Downloading \hms,
				Configuring \hms,
				Compiling \hms{} manually,
				Testing the installation
		}}{#1}{0}{}
	}
}

%\printOutline{3}{0}{}
\printInstallItems{1}

Open a terminal, make sure git is installed

\begin{minted}{bash}
which git
\end{minted}

Output should be similar to:

\begin{minted}{bash}
/usr/bin/git
\end{minted}

If not, install \mintinline{bash}|git|. Then run

\begin{minted}[fontsize=\scriptsize]{bash}
git clone https://git.tu-berlin.de/wahyd/hmspp/hms.git
\end{minted}

\newpage

\printInstallItems{2}
%\phantomsection
%\label{install:conf}

Navigate into folder, run configuration script

\begin{minted}{bash}
cd hms
./configure.sh
\end{minted}
Select your preferences on:
\begin{itemize}
	\item Build configurations
	\item Command shortcuts and autocompletion
	\item Starting the build process
\end{itemize}

For shortcuts and autocompletion to work,
%\begin{itemize}
%	\item restart your shell, or
%	\item source your run control file
%\end{itemize}
restart your shell or source your run control file, e.g.
\begin{minted}{bash}
source ~/.bashrc
\end{minted}


\newpage


\printInstallItems{3}

%Using the command shortcuts for building \hms:
%
%\begin{minted}{bash}
%buildhms Release
%\end{minted}
%
%or
%
%\begin{minted}{bash}
%buildhms Debug
%\end{minted}

To manually compile \hms{} in Release mode, run

\begin{minted}{bash}
cd build/Release
make -j
\end{minted}
For Debug mode, run
\begin{minted}{bash}
cd build/Debug
make -j
\end{minted}

If you chose to enable build shorthands, you can instead use

\begin{minted}{bash}
buildhms Release
\end{minted}

or 

\begin{minted}{bash}
buildhms Debug
\end{minted}

from anywhere on the system.

\newpage

\printInstallItems{4}


To test the installation, run
\begin{minted}{bash}
hms -v
\end{minted}

or, for Debug mode
\begin{minted}{bash}
hmsd -v
\end{minted}

This should print a list of \hms' program components and licences.

If instead something like 
\begin{minted}{bash}
bash: hms: command not found...
\end{minted}
is printed, the installation or registration was not successful.

\newpage

%\setSlideCaption{Troubleshooting}

If your installation was not successful,
check your \hms{} source folder (the one downloaded by \mintinline{bash}|git|,
which you \mintinline{bash}|cd|'d into) for:
\begin{enumerate}
	\item a folder called \mintinline{bash}|build|, and folders named after the build types (Release/Debug) inside
	\item the folder \mintinline{bash}|lib/eigen/install.d|
	\item the file \mintinline{bash}|build/Release/bin/hms| (or \mintinline{bash}|hms.exe|)
\end{enumerate}

If any of the above are missing, rerun \mintinline{bash}|configure.sh|
and make sure to select the option to build \hms{} after completion of the script.

\newpage